package com.yidian.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ArticleExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ArticleExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andArticleIdIsNull() {
            addCriterion("article_id is null");
            return (Criteria) this;
        }

        public Criteria andArticleIdIsNotNull() {
            addCriterion("article_id is not null");
            return (Criteria) this;
        }

        public Criteria andArticleIdEqualTo(Long value) {
            addCriterion("article_id =", value, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdNotEqualTo(Long value) {
            addCriterion("article_id <>", value, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdGreaterThan(Long value) {
            addCriterion("article_id >", value, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdGreaterThanOrEqualTo(Long value) {
            addCriterion("article_id >=", value, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdLessThan(Long value) {
            addCriterion("article_id <", value, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdLessThanOrEqualTo(Long value) {
            addCriterion("article_id <=", value, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdIn(List<Long> values) {
            addCriterion("article_id in", values, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdNotIn(List<Long> values) {
            addCriterion("article_id not in", values, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdBetween(Long value1, Long value2) {
            addCriterion("article_id between", value1, value2, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleIdNotBetween(Long value1, Long value2) {
            addCriterion("article_id not between", value1, value2, "articleId");
            return (Criteria) this;
        }

        public Criteria andArticleCoverIsNull() {
            addCriterion("article_cover is null");
            return (Criteria) this;
        }

        public Criteria andArticleCoverIsNotNull() {
            addCriterion("article_cover is not null");
            return (Criteria) this;
        }

        public Criteria andArticleCoverEqualTo(String value) {
            addCriterion("article_cover =", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverNotEqualTo(String value) {
            addCriterion("article_cover <>", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverGreaterThan(String value) {
            addCriterion("article_cover >", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverGreaterThanOrEqualTo(String value) {
            addCriterion("article_cover >=", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverLessThan(String value) {
            addCriterion("article_cover <", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverLessThanOrEqualTo(String value) {
            addCriterion("article_cover <=", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverLike(String value) {
            addCriterion("article_cover like", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverNotLike(String value) {
            addCriterion("article_cover not like", value, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverIn(List<String> values) {
            addCriterion("article_cover in", values, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverNotIn(List<String> values) {
            addCriterion("article_cover not in", values, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverBetween(String value1, String value2) {
            addCriterion("article_cover between", value1, value2, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticleCoverNotBetween(String value1, String value2) {
            addCriterion("article_cover not between", value1, value2, "articleCover");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdIsNull() {
            addCriterion("article_publisher_id is null");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdIsNotNull() {
            addCriterion("article_publisher_id is not null");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdEqualTo(Long value) {
            addCriterion("article_publisher_id =", value, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdNotEqualTo(Long value) {
            addCriterion("article_publisher_id <>", value, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdGreaterThan(Long value) {
            addCriterion("article_publisher_id >", value, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdGreaterThanOrEqualTo(Long value) {
            addCriterion("article_publisher_id >=", value, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdLessThan(Long value) {
            addCriterion("article_publisher_id <", value, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdLessThanOrEqualTo(Long value) {
            addCriterion("article_publisher_id <=", value, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdIn(List<Long> values) {
            addCriterion("article_publisher_id in", values, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdNotIn(List<Long> values) {
            addCriterion("article_publisher_id not in", values, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdBetween(Long value1, Long value2) {
            addCriterion("article_publisher_id between", value1, value2, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticlePublisherIdNotBetween(Long value1, Long value2) {
            addCriterion("article_publisher_id not between", value1, value2, "articlePublisherId");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateIsNull() {
            addCriterion("article_create_date is null");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateIsNotNull() {
            addCriterion("article_create_date is not null");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateEqualTo(Date value) {
            addCriterion("article_create_date =", value, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateNotEqualTo(Date value) {
            addCriterion("article_create_date <>", value, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateGreaterThan(Date value) {
            addCriterion("article_create_date >", value, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("article_create_date >=", value, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateLessThan(Date value) {
            addCriterion("article_create_date <", value, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("article_create_date <=", value, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateIn(List<Date> values) {
            addCriterion("article_create_date in", values, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateNotIn(List<Date> values) {
            addCriterion("article_create_date not in", values, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateBetween(Date value1, Date value2) {
            addCriterion("article_create_date between", value1, value2, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("article_create_date not between", value1, value2, "articleCreateDate");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountIsNull() {
            addCriterion("article_like_count is null");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountIsNotNull() {
            addCriterion("article_like_count is not null");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountEqualTo(Long value) {
            addCriterion("article_like_count =", value, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountNotEqualTo(Long value) {
            addCriterion("article_like_count <>", value, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountGreaterThan(Long value) {
            addCriterion("article_like_count >", value, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountGreaterThanOrEqualTo(Long value) {
            addCriterion("article_like_count >=", value, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountLessThan(Long value) {
            addCriterion("article_like_count <", value, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountLessThanOrEqualTo(Long value) {
            addCriterion("article_like_count <=", value, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountIn(List<Long> values) {
            addCriterion("article_like_count in", values, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountNotIn(List<Long> values) {
            addCriterion("article_like_count not in", values, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountBetween(Long value1, Long value2) {
            addCriterion("article_like_count between", value1, value2, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleLikeCountNotBetween(Long value1, Long value2) {
            addCriterion("article_like_count not between", value1, value2, "articleLikeCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountIsNull() {
            addCriterion("article_collect_count is null");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountIsNotNull() {
            addCriterion("article_collect_count is not null");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountEqualTo(Long value) {
            addCriterion("article_collect_count =", value, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountNotEqualTo(Long value) {
            addCriterion("article_collect_count <>", value, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountGreaterThan(Long value) {
            addCriterion("article_collect_count >", value, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountGreaterThanOrEqualTo(Long value) {
            addCriterion("article_collect_count >=", value, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountLessThan(Long value) {
            addCriterion("article_collect_count <", value, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountLessThanOrEqualTo(Long value) {
            addCriterion("article_collect_count <=", value, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountIn(List<Long> values) {
            addCriterion("article_collect_count in", values, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountNotIn(List<Long> values) {
            addCriterion("article_collect_count not in", values, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountBetween(Long value1, Long value2) {
            addCriterion("article_collect_count between", value1, value2, "articleCollectCount");
            return (Criteria) this;
        }

        public Criteria andArticleCollectCountNotBetween(Long value1, Long value2) {
            addCriterion("article_collect_count not between", value1, value2, "articleCollectCount");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}